<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
	href="../resources/css/jqueryui/humanity/jquery-ui-1.8.20.custom.css">
<script type="text/javascript"
	src="../js/jquery/jqueryui/jquery-ui-1.8.20.custom.min.js"></script>

<script>
	$(document).ready(function() {
		$("#tabs").tabs();
		addTab();
	});

	function addTab() {
		var tab_title = "Page 1";
		$('#tabs').tabs('add', '../article/loadArticleNewPage', tab_title);
		//tab_counter++;
	}
	$('#add_tab').button().click(function() {
		addTab();
	});

	$('#tabs span.ui-icon-close').live('click', function() {
		var index = $('li', $tabs).index($(this).parent());
		$tabs.tabs('remove', index);
	});
</script>
</head>
<body>
	<button id="add_tab">Add new Chapter</button>

	<div class="container">

		<div class="row">
			<div id="tabs" class="span7">
				<ul>
				</ul>
			</div>
		</div>
	</div>
	
</body>
</html>